package com.hitqz.robot.biz.controller;

import cn.hutool.core.net.NetUtil;
import com.hitqz.robot.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author xupkun
 * @date 2024/5/21
 */
@RestController
@AllArgsConstructor
@RequestMapping(value =  {"/util"})
@Tag(name = "工具接口")
@Slf4j
public class UtilController {

    @GetMapping(value = { "/net/ping"})
    @Operation (summary = "ping测试")
    public R<Boolean> ping(@RequestParam(value = "ip") String ip){
        return R.ok(NetUtil.ping(ip,1000));
    }



}
